import request from '@/utils/request.js'

export default {
	// 获取项目设备分页
	getEquipmentPage(param){
		return request.get('/api/engineeringDevice/page', param)
	},
	//添加项目设备
	addEquipment(param){
		return request.post('/api/engineeringDevice/add', param)
	},
	//修改项目设备
	editEquipment(param){
		return request.post('/api/engineeringDevice/update', param)
	},
	//删除项目设备
	delEquipment(param){
		return request.del('/api/engineeringDevice/delete', {ids:param},
		{ header: { "content-type":"application/x-www-form-urlencoded" } },
		)
	},
	//根据id查看设备详情
	getEquipmentDetail(param){
		return request.get('/api/engineeringDevice/detail', param)
	},
	//查询项目中用户设备
	getDevicesList(param){
		return request.get('/api/devices/info/list', param)
	},
	//消除设备告警
	clearAlarm(param){
		return request.get('/api/engineeringDevice/clearAlarm', param)
	},
	//查询启停装置设备列表
	getStartStopDevice(param){
		return request.get('/api/startstop/device', param)
	},
	
	//查询检测设备
	getDevicesTree(param){
		return request.get('/api/tree/devices', param)
	},
	//查询设备最新一条数据
	getDeviceNewData(param){
		return request.get('/api/devices/data', param)
	},
	//查询环流历史数据表格
	getCirHistory(param){
		return request.get('/api/circulation/history', param)
	},
	//查询地钉历史数据表格
	getNailHistory(param){
		return request.get('/api/nail/history', param)
	},
	//查询故障定位历史数据表格
	getFaultLocaHistory(param){
		return request.get('/api/fault-location/history', param)
	},
	//查询接头感知历史数据表格
	getJointHistory(param){
		return request.get('/api/joint/perception/history', param)
	},
	//查询外置局放历史数据表格
	getOutPhase(param){
		return request.get('/api/out/partial/max/history', param)
	},
	//查询历史告警数据表格
	getAlarmHistory(param){
		return request.get('/api/alarm/history', param)
	},
	//查询启停装置历史数据表格
	getStartStopHistory(param){
		return request.get('/api/startstop/history', param)
	},
}